package droid.engine;

import android.graphics.*;

public class MyGameObject extends GameObject {

	public MyGameObject(Bitmap bitmap, Vector2 position) {
		this.bitmap = bitmap;
		this.position = position;
	}

	@Override
	public void update(float deltaTime) {
		this.position = position.addVector(new Vector2(0,0));
	}

	@Override
	public void draw(Canvas c) {
		Matrix transform = new Matrix();
		
		transform.postScale(1.0f, 1.0f);
		transform.postRotate(45.0f, bitmap.getWidth() / 2, bitmap.getHeight() / 2);
		transform.postTranslate(position.getX()- bitmap.getWidth() / 2, position.getY() - bitmap.getHeight() / 2);
		
		c.drawBitmap(bitmap, transform, null);
	}
}
